<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ page import="avicit.platform6.commons.utils.ComUtil"%>
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@ taglib prefix="sec" uri="/WEB-INF/tags/shiro.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <base href="<%=ViewUtil.getRequestPath(request)%>">
        <%
	Locale locale =SessionHelper.getLocaleByUser(request);
%>
    <jsp:include page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
    <jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
    <script src="static/js/platform/component/common/exportData.js" type="text/javascript"></script>
    <script type="text/javascript" src="avicit/im/lantop/basic/reportmanager/js/LantopFineReport.js"></script>
    <%--报表预览 --%>
    <title><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.reportmanager.button.reportPreview","i18n.lantop",locale)%></title>

    <script type="text/javascript">
        var type = "${type}";
        var sql = "${sql}";
        var type = "${type}";
        var reportName = "${reportName}";

        var lantopFineReport ;

        $(function(){

            var args = {};

            if(type == '1'){
                // 报表预览
                args = {
                    op : "write",
                    __showtoolbar__ : "true"
                };

            }else{
                // 报表打印
                args = {
                    __showtoolbar__ : "true"
                };
            }

            lantopFineReport = new LantopFineReport("<%=ViewUtil.getRequestPath(request)%>",
                args, "reportView", false);

            lantopFineReport.submit({
                SQL : sql,
                reportlet :reportName
            });

        });

    </script>


<body class="easyui-layout" fit='true'>


<iframe name="reportView" width="100%" height="100%" id="reportView" frameborder="0">

</iframe>





</body>
</html>